package com.zhou.dao;

import com.zhou.domain.PrimaryStudent;
import com.zhou.domain.Student;
import com.zhou.util.QueryParam;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface StudentDao {

    //select * from student
    //5-18号的方法
    int countStudent();
    Map<Object,Object> selectReturnMap(int id);
    List<Student> selectUseResultMap(QueryParam param);
    List<PrimaryStudent> selectUseFieldAlias(QueryParam param);
    List<PrimaryStudent> selectDiffResultMap(QueryParam param);
    List<Student> selectLikeFirst(String name);
    List<Student> selectLikeSecond(String name);
    List<Student> selectSudentIf(Student student);
    List<Student> selectStudentWhere(Student student);
    List<Student> selectStudentForList(List<Integer> idList);
    List<Student> selectStudentForList2(List<Student> stuList);
    List<Student> selectStudentSqlFragment(List<Student> stuList);


    //以前的代码
    public List<Student> selectStudents() ;
    Student selectFindById(int id);
    Student selectByName(@Param("stu_name") String name,@Param("stu_id") int id);
    List<Student> selectMultObject(QueryParam queryParam);

    public Student selectByName2( String name,int id);

    int updateStudent(Student student) ;

    int deleteStudent(int id) ;

    int insertOneStudent(Student student) ;


}
